package com.ws.ssmzongjie3.mapper;

import com.ws.ssmzongjie3.bean.Acl_Permission;
import com.ws.ssmzongjie3.bean.Acl_Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface Acl_PermissionMapper {
    @Delete("DELETE FROM acl_permission WHERE perm_id = #{perm_id}")
    int deleteAcl_PermissionById(Acl_Permission acl_Permission);
    @Insert("INSERT INTO acl_permission(pid,name,path,is_deleted,create_time,update_time) VALUES(#{pid},#{name},#{path},#{is_deleted},now(),now())")
    int insertAcl_Permission(Acl_Permission acl_Permission);
    @Select("SELECT * FROM acl_permission WHERE perm_id = #{perm_id}")
    Acl_Permission getAcl_PermissionById(Acl_Permission acl_Permission);
    //listPermissionsByRoleId
    List<Integer> listPermissionsByRoleId(Acl_Role acl_Role);

    int updateAcl_Permission(Acl_Permission acl_Permission);
    List<Acl_Permission> listAcl_Permission(Acl_Permission acl_Permission);
}
